package com.xbongbong.parent.abstracts;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.parent.interfaces.BusinessBatchTeamOperateService;
import com.xbongbong.pro.enums.errorcodes.BuinessDefaultErrorCodeEnum;
import com.xbongbong.pro.listbatch.pojo.dto.ChangeMainDTO;
import com.xbongbong.pro.listbatch.pojo.vo.TeamBatchVO;
import com.xbongbong.saas.constant.StringConstant;

/**
 * @author 吴峰
 * @date 2022/11/14 10:51
 */
public abstract class AbstractBatchTeamOperateService implements BusinessBatchTeamOperateService {



    @Override
    public TeamBatchVO teamChangeMain(ChangeMainDTO changeMainDTO) throws XbbException {
        int size = changeMainDTO.getDataIdList().size();
        if (size > StringConstant.MAX_SIZE) {
            throw new XbbException(BuinessDefaultErrorCodeEnum.API_ERROR_200029);
        }
        return changeMain(changeMainDTO);
    }


}
